package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.CzVideoMapper;
import com.ruoyi.business.domain.CzVideo;
import com.ruoyi.business.service.ICzVideoService;

/**
 * 视频记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-01-01
 */
@Service
public class CzVideoServiceImpl implements ICzVideoService 
{
    @Autowired
    private CzVideoMapper czVideoMapper;

    /**
     * 查询视频记录
     * 
     * @param videoId 视频记录主键
     * @return 视频记录
     */
    @Override
    public CzVideo selectCzVideoByVideoId(String videoId)
    {
        return czVideoMapper.selectCzVideoByVideoId(videoId);
    }

    /**
     * 查询视频记录列表
     * 
     * @param czVideo 视频记录
     * @return 视频记录
     */
    @Override
    public List<CzVideo> selectCzVideoList(CzVideo czVideo)
    {
        return czVideoMapper.selectCzVideoList(czVideo);
    }

    /**
     * 新增视频记录
     * 
     * @param czVideo 视频记录
     * @return 结果
     */
    @Override
    public int insertCzVideo(CzVideo czVideo)
    {
        czVideo.setCreateTime(DateUtils.getNowDate());
        return czVideoMapper.insertCzVideo(czVideo);
    }

    /**
     * 修改视频记录
     * 
     * @param czVideo 视频记录
     * @return 结果
     */
    @Override
    public int updateCzVideo(CzVideo czVideo)
    {
        czVideo.setUpdateTime(DateUtils.getNowDate());
        return czVideoMapper.updateCzVideo(czVideo);
    }

    /**
     * 批量删除视频记录
     * 
     * @param videoIds 需要删除的视频记录主键
     * @return 结果
     */
    @Override
    public int deleteCzVideoByVideoIds(String[] videoIds)
    {
        return czVideoMapper.deleteCzVideoByVideoIds(videoIds);
    }

    /**
     * 删除视频记录信息
     * 
     * @param videoId 视频记录主键
     * @return 结果
     */
    @Override
    public int deleteCzVideoByVideoId(String videoId)
    {
        return czVideoMapper.deleteCzVideoByVideoId(videoId);
    }
}
